Interface DNSServerProcess

All Superinterfaces:
IPCObject, Process
All Known Implementing Classes:
DNSServerProcessImpl

public interface DNSServerProcess extends Process
Information provided by the PKI file:

    \class DnsServerProcess
    
    \brief DnsServerProcess is the process that stores DNS records and resolves domain names and hostnames into IP addresses.
    
    \example network().getDevice("Server0").getProcess("DnsServer")
    
Author:
Auto-generated
  • Method Details

    • addIpAddress

      boolean addIpAddress(String hostname, IPAddress ipAddress)
      Information provided by the PKI file:
      
          \brief Adds a DNS record with the specified hostname and IP address.
          
          \param hostname, the hostname of the DNS record.
          \param ipAddress, the IP address of the DNS record.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      ipAddress - Takes in a parameter of ipAddress
      Returns:
      boolean Returns a boolean
    • removeIpAddress

      void removeIpAddress(String hostname)
      Information provided by the PKI file:
      
          \brief Removes the DNS record with the associated hostname.
          
          \param hostname, the hostname of the DNS record of interest.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
    • getEntryAt

      Pair<String,IPAddress> getEntryAt(int index)
      Information provided by the PKI file:
      
          \Returns the hostname and IP address of the DNS record at the specified index.
          
          \param index, the DNS record index of interest.
          
          \return pair<string, ip>, the hostname and IP address of the DNS record at the specified index.
          
              
      Parameters:
      index - Takes in a parameter of index
      Returns:
      Pair<String, IPAddress> Returns a Pair<String, IPAddress>
    • getEntryCount

      int getEntryCount()
      Information provided by the PKI file:
      
          \brief Returns the number of DNS records.
          
          \return int, the number of DNS records.
          
              
      Returns:
      int Returns a int
    • isValidName

      boolean isValidName(String hostname)
      Information provided by the PKI file:
      
          \brief Returns true if the specified hostname is a valid name (non-special characters), otherwise false.
          
          \param hostname, the hostname of interest.
          
          \return bool, true if the specified hostname is a valid name (non-special characters), otherwise false.
          
              
      Parameters:
      hostname - Takes in a parameter of hostname
      Returns:
      boolean Returns a boolean
    • setEnable

      void setEnable(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables the DNS server process.
          
          \param bEnable, true to enable the DNS server process, false to disable it.
          
              
      Parameters:
      bEnable - Takes in a parameter of bEnable
    • isEnabled

      boolean isEnabled()
      Information provided by the PKI file:
      
          \brief Returns true if the DNS server process is enabled, otherwise false.
          
          \return bool, true if the DNS server process is enabled, otherwise false.
          
              
      Returns:
      boolean Returns a boolean
    • setPortNumber

      void setPortNumber(int num)
      Information provided by the PKI file:
      
          \brief Sets the port number of the DNS service.
          
          \param num, the port number to set the DNS service to.
          
              
      Parameters:
      num - Takes in a parameter of num
    • getPortNumber

      int getPortNumber()
      Information provided by the PKI file:
      
          \brief Returns the port number of the DNS service.
          
          \return int, the port number of the DNS service.
          
              
      Returns:
      int Returns a int
    • isDomainNameExisted

      boolean isDomainNameExisted(String domainName)
      Information provided by the PKI file:
      
          \brief Returns true if the specified domain name exists, otherwise false.
          
          \param domainName, the domain name of interest.
          
          \return bool, true if the specified domain name exists, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      Returns:
      boolean Returns a boolean
    • getIpAddOfDomain

      IPAddress getIpAddOfDomain(String domainName)
      Information provided by the PKI file:
      
          \brief Returns the IP address of the specified domain name.
          
          \param domainName, the domain name of interest.
          
          \return ip, the IP address of the specified domain name.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      Returns:
      IPAddress Returns a IPAddress
    • getARecordWithAddress

      DNSRrA getARecordWithAddress(String domainName, IPAddress address)
      Information provided by the PKI file:
      
          \brief Returns the A resource record with the specified parameters.
          
          \param domainName, the domain name of the A resource record of interest.
          \param address, the address of the A resource record of interest.
          
          \return DnsRrA, the A resource record object with the specified parameters.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      address - Takes in a parameter of address
      Returns:
      DNSRrA Returns a DNSRrA
    • getCNameRecordWithHostname

      DNSRrCname getCNameRecordWithHostname(String domainName, String hostName)
      Information provided by the PKI file:
      
          \brief Returns the CNAME resource record with the specified parameters.
          
          \param domainName, the domain name of the CNAME resource record of interest.
          \param hostName, the hostname of the CNAME resource record of interest.
          
          \return DnsRrCname, the CNAME resource record object with the specified parameters.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      hostName - Takes in a parameter of hostName
      Returns:
      DNSRrCname Returns a DNSRrCname
    • getSOARecordWithMailbox

      DNSRrSoa getSOARecordWithMailbox(String domainName, String mailbox)
      Information provided by the PKI file:
      
          \brief Returns the SOA resource record with the specified parameters.
          
          \param domainName, the domain name of the SOA resource record of interest.
          \param mailbox, the mailbox of the SOA resource record of interest.
          
          \return DnsRrSoa, the SOA resource record object with the specified parameters.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      mailbox - Takes in a parameter of mailbox
      Returns:
      DNSRrSoa Returns a DNSRrSoa
    • getNSRecordWithServerName

      DNSRrNs getNSRecordWithServerName(String domainName, String serverName)
      Information provided by the PKI file:
      
          \brief Returns the NS resource record with the specified parameters.
          
          \param domainName, the domain name of the NS resource record of interest.
          \param serverName, the server name of the NS resource record of interest.
          
          \return DnsRrNs, the NS resource record object with the specified parameters.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      serverName - Takes in a parameter of serverName
      Returns:
      DNSRrNs Returns a DNSRrNs
    • addARecordToNameServerDb

      boolean addARecordToNameServerDb(String domainName, String address)
      Information provided by the PKI file:
      
          \brief Returns true if the A resource record was added successfully, otherwise false.
          
          \param domainName, the domain name for the A resource record.
          \param address, the address for the A resource record.
          
          \return bool, true if the A resource record was added successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      address - Takes in a parameter of address
      Returns:
      boolean Returns a boolean
    • addCNAMEToNameServerDb

      boolean addCNAMEToNameServerDb(String domainName, String hostName)
      Information provided by the PKI file:
      
          \brief Returns true if the CNAME resource record was added successfully, otherwise false.
          
          \param domainName, the domain name for the CNAME resource record.
          \param hostName, the hostname for the CNAME resource record.
          
          \return bool, true if the CNAME resource record was added successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      hostName - Takes in a parameter of hostName
      Returns:
      boolean Returns a boolean
    • addSOAToNameServerDb

      boolean addSOAToNameServerDb(String domainName, String serverName, String mailbox, String minTtl, String refresh, String retry, String expiry)
      Information provided by the PKI file:
      
          \brief Returns true if the SOA resource record was added successfully, otherwise false.
          
          \param domainName, the domain name for the SOA resource record.
          \param serverName, the primary server name for the SOA resource record.
          \param mailbox, the mailbox for the SOA resource record.
          \param minTtl, the minimum TTL for the SOA resource record.
          \param refresh, the refresh time for the SOA resource record.
          \param retry, the retry time for the SOA resource record.
          \param expiry, the expiry time for the SOA resource record.
          
          \return bool, true if the CNAME resource record was added successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      serverName - Takes in a parameter of serverName
      mailbox - Takes in a parameter of mailbox
      minTtl - Takes in a parameter of minTtl
      refresh - Takes in a parameter of refresh
      retry - Takes in a parameter of retry
      expiry - Takes in a parameter of expiry
      Returns:
      boolean Returns a boolean
    • addNSRecordToNameServerDb

      boolean addNSRecordToNameServerDb(String domainName, String serverName)
      Information provided by the PKI file:
      
          \brief Returns true if the NS resource record was added successfully, otherwise false.
          
          \param domainName, the domain name for the NS resource record.
          \param serverName, the server name for the NS resource record.
          
          \return bool, true if the NS record was added successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      serverName - Takes in a parameter of serverName
      Returns:
      boolean Returns a boolean
    • removeARecordFromNameServerDb

      boolean removeARecordFromNameServerDb(String domainName, String address)
      Information provided by the PKI file:
      
          \brief Returns true if the specified A resource record was removed successfully, otherwise false.
          
          \param domainName, the domain name of the A resource record of interest.
          \param address, the address of the A resource record of interest.
          
          \return bool, true if the specified A resource record was removed successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      address - Takes in a parameter of address
      Returns:
      boolean Returns a boolean
    • removeCNAMEFromNameServerDb

      boolean removeCNAMEFromNameServerDb(String domainName, String hostName)
      Information provided by the PKI file:
      
          \brief Returns true if the specified CNAME resource record was removed successfully, otherwise false.
          
          \param domainName, the domain name of the CNAME resource record of interest.
          \param hostName, the hostname of the CNAME resource record of interest.
          
          \return bool, true if the specified CNAME resource record was removed successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      hostName - Takes in a parameter of hostName
      Returns:
      boolean Returns a boolean
    • removeSOAFromNameServerDb

      boolean removeSOAFromNameServerDb(String domainName, String mailbox)
      Information provided by the PKI file:
      
          \brief Returns true if the specified SOA resource record was removed successfully, otherwise false.
          
          \param domainName, the domain name of the SOA resource record of interest.
          \param mailbox, the mailbox of the SOA resource record of interest.
          
          \return bool, true if the specified SOA resource record was removed successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      mailbox - Takes in a parameter of mailbox
      Returns:
      boolean Returns a boolean
    • removeNSRecordFromNameServerDb

      boolean removeNSRecordFromNameServerDb(String domainName, String serverName)
      Information provided by the PKI file:
      
          \brief Returns true if the specified NS resource record was removed successfully, otherwise false.
          
          \param domainName, the domain name of the NS resource record of interest.
          \param serverName, the server name of the NS resource record of interest.
          
          \return bool, true if the specified NS resource record was removed successfully, otherwise false.
          
              
      Parameters:
      domainName - Takes in a parameter of domainName
      serverName - Takes in a parameter of serverName
      Returns:
      boolean Returns a boolean
    • getSizeOfNameServerDb

      int getSizeOfNameServerDb()
      Information provided by the PKI file:
      
          \brief Returns the size of the name server database.
          
          \return int, the size of the name server database.
          
              
      Returns:
      int Returns a int
    • getRrFromNameServerDbAt

      DNSResourceRecord getRrFromNameServerDbAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the resource record at the specified index.
          
          \param index, the index of the resource record of interest.
          
          \return DnsResourceRecord, the resource record DnsResourceRecord object at the specified index.
          
              
      Parameters:
      index - Takes in a parameter of index
      Returns:
      DNSResourceRecord Returns a DNSResourceRecord
    • getMatchingRRsFromCache

      List<DNSResourceRecord> getMatchingRRsFromCache(String name)
      Information provided by the PKI file:
      
          \brief Returns the resource record associated with the resource record name.
          
          \param name, the name of the resource record of interest.
          
          \return DnsResourceRecord, the resource record DnsResourceRecord object associated with the resource record name.
          
              
      Parameters:
      name - Takes in a parameter of name
      Returns:
      List<DNSResourceRecord> Returns a List<DNSResourceRecord>